## Compiler and linker settings
DEFINES = -Wall -Werror -g
LIBOGRE = OGRE
LIBS = $(LIBOGRE) CEGUI-OGRE CEGUI
CXX = g++
CXOGRE =  $(shell pkg-config --cflags $(LIBOGRE)) $(DEFINES)
CXXFLAGS = $(shell pkg-config --cflags $(LIBS)) $(DEFINES)
LD = g++
LDFLAGS = $(shell pkg-config --libs $(LIBS))

## Files to include in yourApp project
APP = cpu.o host.o keyboard.o memory.o site.o disk.o interface.o  ogreapplication.o trackball.o main.o 


## Compilation and linking occurs here
Visage: $(APP)
	$(LD) $(LDFLAGS) $(APP) -ltinyxml -o Visage

main.o : main.cpp 
	$(LD) $(CXOGRE) -c main.cpp  

cpu.o: cpu.h cpu.cpp 
	$(LD) $(CXOGRE) -c cpu.cpp   

host.o : host.h host.cpp
	$(LD) $(CXOGRE) -c host.cpp  

keyboard.o : keyboard.h keyboard.cpp
	$(LD) $(CXOGRE) -c keyboard.cpp 

memory.o : memory.h memory.cpp
	$(LD) $(CXOGRE) -c memory.cpp     

site.o : site.h site.cpp
	$(LD) $(CXOGRE) -c site.cpp

disk.o : disk.h disk.cpp
	$(LD) $(CXOGRE) -c disk.cpp 

interface.o : interface.h interface.cpp
	$(LD) $(CXOGRE) -c interface.cpp 

ogreapplication.o : ogreapplication.h ogreapplication.cpp
	$(LD) $(CXOGRE) -c ogreapplication.cpp

trackball.o : trackball.h trackball.cpp
	$(LD) $(CXOGRE) -c trackball.cpp


## Clean up
clean:
	rm -f $(APP) Visage
